@model dynamic
@{
    var requirementsMessage = T.Plural("The password can't be empty", "Passwords are required to be a minimum of {0} characters in length", (int)Model.PasswordLength).Text;
    var additionalRequirementsMessage = new List<string>();
    if ((bool)Model.LowercaseRequirement) {
        additionalRequirementsMessage.Add(T("one lowercase letter").Text);
    }
    if ((bool)Model.UppercaseRequirement) {
        additionalRequirementsMessage.Add(T("one uppercase letter").Text);
    }
    if ((bool)Model.NumberRequirement) {
        additionalRequirementsMessage.Add(T("one number").Text);
    }
    if ((bool)Model.SpecialCharacterRequirement) {
        additionalRequirementsMessage.Add(T("one special character").Text);
    }
    if (additionalRequirementsMessage.Count() > 0) {
        requirementsMessage = T("{0} and must contain at least {1}", requirementsMessage, string.Join(", ", additionalRequirementsMessage)).Text;
    }
    requirementsMessage += ".";
}

<h1>@Html.TitleForPage(T("Change Expired Password"))</h1>
<p>@T("Your password has expired. Use the form below to change your password.")</p>
<p>@requirementsMessage</p>
@Html.ValidationSummary(T("Password change was unsuccessful. Please correct the errors and try again.").Text)
@using (Html.BeginFormAntiForgeryPost()) {
    <fieldset>
        <legend>@T("Account Information")</legend>
        <div>
            @T("Username: {0}", Model.Username)
        </div>
        <div>
            <label for="currentPassword">@T("Current Password:")</label>
            @Html.Password("currentPassword")
            @Html.ValidationMessage("currentPassword")
        </div>
        <div>
            <label for="newPassword">@T("New Password:")</label>
            @Html.Password("newPassword")
            @Html.ValidationMessage("newPassword")
        </div>
        <div>
            <label for="confirmPassword">@T("Confirm New Password:")</label>
            @Html.Password("confirmPassword")
            @Html.ValidationMessage("confirmPassword")
        </div>
        <div>
            <button class="primaryAction" type="submit">@T("Change Password")</button>
        </div>
    </fieldset>
}